import request from '@/utils/request'

//获取角色信息列表接口
export function getList(params) {
  return request({
    url: '/rbac/userRole/list',
    method: 'get',
    params
  })
}
//  新增角色接口
export function addRoleInfo(data) {
  return request({
    url: '/rbac/userRole/insertRole',
    method: 'post',
    data
  })
}

//  修改角色接口
export function editRoleInfo(data) {
  return request({
    url: '/rbac/userRole/updateRole',
    method: 'post',
    data
  })
}

//  删除
export function deleteRoleInfo(id) {
  return request({
    url: '/rbac/userRole/delete',
    method: 'get',
    params:{id}
  })
}

//查询角色接口
export function findRoleInfo(query) {
  return request({
    url: '/rbac/userRole/findRole',
    method: 'get',
    params: query
  })
}

//userRole/register/roleList"
/**
 * 注册时获取角色信息列表接口
 * @param {*} params 
 * @returns 
 */
export function getRegisterList(params) {
  return request({
    url: '/info/userRole/register/roleList',
    method: 'get',
    params
  })
}